package demon01;

import java.util.ArrayList;
import java.util.List;
import java.util.OptionalDouble;
import java.util.Scanner;

public class App {
	private static Scanner sc = new Scanner(System.in);

	private static List<Double> lists = new ArrayList<Double>();

	public static void main(String[] args) {
		System.out.println("Please Input Your scores Around 8 subjects:");
		System.out.println(
				"a------------b---------------c-----------------d--------------e----------------f--------------g-----------h");

		for (double num; (num = sc.nextDouble()) != -1;) {
			lists.add(num);
		}

		OptionalDouble ave = lists.stream().mapToDouble(x -> x).average();
		System.out.println(ave.getAsDouble());
	}

}
